<?php 
/**
 * memcache驱动
 * @author Yuwei(yuwei1122@gmail.com)
 */
class BluePhp_Library_Session_Drives_Memcache
{	
	/**
	 * open
	 * @return unknown
	 */
	public function open()
	{
		return true;
	}
	
	/**
	 * close
	 * @return unknown
	 */
	public function close()
	{
		return true;
	}
	
	/**
	 * read
	 * @param unknown_type $sid
	 */
	public function read($sid)
	{
		return BluePhp_Library_Cache_Adapter::get($sid);
	}
	
	/**
	 * write
	 * @param unknown_type $sid
	 * @param unknown_type $data
	 */
	public function write($sid,$data)
	{
		return BluePhp_Library_Cache_Adapter::set($sid,$data,SESS_LIFETIME);
	}
	
	/**
	 * destroy
	 * @param unknown_type $sid
	 */
	public function destroy($sid)
	{
		return BluePhp_Library_Cache_Adapter::delete($sid);
	}
	
	/**
	 * gc
	 * @return unknown
	 */
	public function gc()
	{
		return true;
	}
}
?>